package com.allbluefish.learn.thread;

import com.allbluefish.learn.model.Account;

public class WithdrawThread implements Runnable {
	Account account;
	int amount;

	public WithdrawThread(Account account, int amount) {
		this.account = account;
		this.amount = amount;
	}

	public void run() {
		for (int i = 0; i < 100000; i++) {
			this.account.withdrawSync(this.amount);
		}
	}
}
